| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Static Public Member Functions | List of all members
nkGraphics::StructToString Class Reference

Converts enums to string, and vice versa. More...

## Static Public Member Functions
static nkMemory::StringView | getShaderTypeString (SHADER_TYPE val)
static SHADER_TYPE | getStringShaderType (nkMemory::StringView str)
static nkMemory::StringView | getShaderSemanticString (SHADER_SEMANTIC val)
static SHADER_SEMANTIC | getStringShaderSemantic (nkMemory::StringView str)
static nkMemory::StringView | getProgramProfileString (PROGRAM_COMPILATION_PROFILE val)
static PROGRAM_COMPILATION_PROFILE | getStringProgramProfile (nkMemory::StringView str)
static nkMemory::StringView | getBlendString (BLEND val)
static BLEND | getStringBlend (nkMemory::StringView str)
static BLEND | getBlendFromIndex (unsigned int index)
static nkMemory::StringView | getBlendOpString (BLEND_OP val)
static BLEND_OP | getStringBlendOp (nkMemory::StringView str)
static BLEND_OP | getBlendOpFromIndex (unsigned int index)
static nkMemory::StringView | getWriteMaskString (COLOR_WRITE_ENABLE val)
static COLOR_WRITE_ENABLE | getStringWriteMask (nkMemory::StringView str)
static COLOR_WRITE_ENABLE | getWriteMaskFromIndex (unsigned int index)
static nkMemory::StringView | getDepthWriteMaskString (DEPTH_WRITE_MASK val)
static DEPTH_WRITE_MASK | getStringDepthWriteMask (nkMemory::StringView str)
static DEPTH_WRITE_MASK | getDepthWriteMaskFromIndex (unsigned int index)
static nkMemory::StringView | getStencilOpString (STENCIL_OP val)
static STENCIL_OP | getStringStencilOp (nkMemory::StringView str)
static STENCIL_OP | getStencilOpFromIndex (unsigned int index)
static nkMemory::StringView | getFillModeString (FILL_MODE val)
static FILL_MODE | getStringFillMode (nkMemory::StringView str)
static FILL_MODE | getFillModeFromIndex (unsigned int index)
static nkMemory::StringView | getCullModeString (CULL_MODE val)
static CULL_MODE | getStringCullMode (nkMemory::StringView str)
static CULL_MODE | getCullModeFromIndex (unsigned int index)
static nkMemory::StringView | getUsageString (BUFFER_USAGE val)
static BUFFER_USAGE | getStringUsage (nkMemory::StringView str)
static BUFFER_USAGE | getUsageFromIndex (unsigned int index)
static nkMemory::StringView | getFormatString (FORMAT val)
static FORMAT | getStringFormat (nkMemory::StringView str)
static FORMAT | getFormatFromIndex (unsigned int index)
static nkMemory::StringView | getBindFlagString (BUFFER_BIND_FLAG val)
static BUFFER_BIND_FLAG | getStringBindFlag (nkMemory::StringView str)
static BUFFER_BIND_FLAG | getBindFlagFromIndex (unsigned int index)
static nkMemory::StringView | getCpuAccessFlagString (BUFFER_CPU_ACCESS_FLAG val)
static BUFFER_CPU_ACCESS_FLAG | getStringCpuAccessFlag (nkMemory::StringView str)
static BUFFER_CPU_ACCESS_FLAG | getCpuAccessFlagFromIndex (unsigned int index)
static nkMemory::StringView | getMiscFlagString (RESOURCE_MISC_FLAG val)
static RESOURCE_MISC_FLAG | getStringMiscFlag (nkMemory::StringView str)
static RESOURCE_MISC_FLAG | getMiscFlagFromIndex (unsigned int index)
static nkMemory::StringView | getPassTypeString (PASS_TYPE val)
static PASS_TYPE | getStringPassType (nkMemory::StringView str)
static nkMemory::StringView | getResourceTypeString (RESOURCE_TYPE val)
static RESOURCE_TYPE | getStringResourceType (nkMemory::StringView str)
static nkMemory::StringView | getTexRenderFlagString (TEX_RENDER_FLAG val)
static TEX_RENDER_FLAG | getStringTexRenderFlag (nkMemory::StringView str)

## Detailed Description

Converts enums to string, and vice versa.

Mainly used for error reporting and data exporting within the component.

## Member Function Documentation

## ◆ getShaderTypeString()

static nkMemory::StringView nkGraphics::StructToString::getShaderTypeString | ( | SHADER_TYPE | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringShaderType()

static SHADER_TYPE nkGraphics::StructToString::getStringShaderType | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getShaderSemanticString()

static nkMemory::StringView nkGraphics::StructToString::getShaderSemanticString | ( | SHADER_SEMANTIC | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringShaderSemantic()

static SHADER_SEMANTIC nkGraphics::StructToString::getStringShaderSemantic | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getProgramProfileString()

static nkMemory::StringView nkGraphics::StructToString::getProgramProfileString | ( | PROGRAM_COMPILATION_PROFILE | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringProgramProfile()

static PROGRAM_COMPILATION_PROFILE nkGraphics::StructToString::getStringProgramProfile | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getBlendString()

static nkMemory::StringView nkGraphics::StructToString::getBlendString | ( | BLEND | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringBlend()

static BLEND nkGraphics::StructToString::getStringBlend | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getBlendFromIndex()

static BLEND nkGraphics::StructToString::getBlendFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getBlendOpString()

static nkMemory::StringView nkGraphics::StructToString::getBlendOpString | ( | BLEND_OP | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringBlendOp()

static BLEND_OP nkGraphics::StructToString::getStringBlendOp | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getBlendOpFromIndex()

static BLEND_OP nkGraphics::StructToString::getBlendOpFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getWriteMaskString()

static nkMemory::StringView nkGraphics::StructToString::getWriteMaskString | ( | COLOR_WRITE_ENABLE | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringWriteMask()

static COLOR_WRITE_ENABLE nkGraphics::StructToString::getStringWriteMask | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getWriteMaskFromIndex()

static COLOR_WRITE_ENABLE nkGraphics::StructToString::getWriteMaskFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getDepthWriteMaskString()

static nkMemory::StringView nkGraphics::StructToString::getDepthWriteMaskString | ( | DEPTH_WRITE_MASK | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringDepthWriteMask()

static DEPTH_WRITE_MASK nkGraphics::StructToString::getStringDepthWriteMask | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getDepthWriteMaskFromIndex()

static DEPTH_WRITE_MASK nkGraphics::StructToString::getDepthWriteMaskFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getStencilOpString()

static nkMemory::StringView nkGraphics::StructToString::getStencilOpString | ( | STENCIL_OP | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringStencilOp()

static STENCIL_OP nkGraphics::StructToString::getStringStencilOp | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getStencilOpFromIndex()

static STENCIL_OP nkGraphics::StructToString::getStencilOpFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getFillModeString()

static nkMemory::StringView nkGraphics::StructToString::getFillModeString | ( | FILL_MODE | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringFillMode()

static FILL_MODE nkGraphics::StructToString::getStringFillMode | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getFillModeFromIndex()

static FILL_MODE nkGraphics::StructToString::getFillModeFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getCullModeString()

static nkMemory::StringView nkGraphics::StructToString::getCullModeString | ( | CULL_MODE | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringCullMode()

static CULL_MODE nkGraphics::StructToString::getStringCullMode | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getCullModeFromIndex()

static CULL_MODE nkGraphics::StructToString::getCullModeFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getUsageString()

static nkMemory::StringView nkGraphics::StructToString::getUsageString | ( | BUFFER_USAGE | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringUsage()

static BUFFER_USAGE nkGraphics::StructToString::getStringUsage | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getUsageFromIndex()

static BUFFER_USAGE nkGraphics::StructToString::getUsageFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getFormatString()

static nkMemory::StringView nkGraphics::StructToString::getFormatString | ( | FORMAT | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringFormat()

static FORMAT nkGraphics::StructToString::getStringFormat | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getFormatFromIndex()

static FORMAT nkGraphics::StructToString::getFormatFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getBindFlagString()

static nkMemory::StringView nkGraphics::StructToString::getBindFlagString | ( | BUFFER_BIND_FLAG | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringBindFlag()

static BUFFER_BIND_FLAG nkGraphics::StructToString::getStringBindFlag | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getBindFlagFromIndex()

static BUFFER_BIND_FLAG nkGraphics::StructToString::getBindFlagFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getCpuAccessFlagString()

static nkMemory::StringView nkGraphics::StructToString::getCpuAccessFlagString | ( | BUFFER_CPU_ACCESS_FLAG | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringCpuAccessFlag()

static BUFFER_CPU_ACCESS_FLAG nkGraphics::StructToString::getStringCpuAccessFlag | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getCpuAccessFlagFromIndex()

static BUFFER_CPU_ACCESS_FLAG nkGraphics::StructToString::getCpuAccessFlagFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getMiscFlagString()

static nkMemory::StringView nkGraphics::StructToString::getMiscFlagString | ( | RESOURCE_MISC_FLAG | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringMiscFlag()

static RESOURCE_MISC_FLAG nkGraphics::StructToString::getStringMiscFlag | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getMiscFlagFromIndex()

static RESOURCE_MISC_FLAG nkGraphics::StructToString::getMiscFlagFromIndex | ( | unsigned int | index | ) |
| static

Retrieves an enum value by index. Allows to loop over all values, for instance.

Parameters

  index | The index of the enum to retrieve.

Returns
  The enum value with index associated, -1 if no value available.

## ◆ getPassTypeString()

static nkMemory::StringView nkGraphics::StructToString::getPassTypeString | ( | PASS_TYPE | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringPassType()

static PASS_TYPE nkGraphics::StructToString::getStringPassType | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getResourceTypeString()

static nkMemory::StringView nkGraphics::StructToString::getResourceTypeString | ( | RESOURCE_TYPE | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringResourceType()

static RESOURCE_TYPE nkGraphics::StructToString::getStringResourceType | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

## ◆ getTexRenderFlagString()

static nkMemory::StringView nkGraphics::StructToString::getTexRenderFlagString | ( | TEX_RENDER_FLAG | val | ) |
| static

Converts an enum entry to a string.

Parameters

  val | The enum value to convert.

Returns
  A string expressing the enum value.

## ◆ getStringTexRenderFlag()

static TEX_RENDER_FLAG nkGraphics::StructToString::getStringTexRenderFlag | ( | nkMemory::StringView | str | ) |
| static

Converts a string to an enum value.

Parameters

  str | The string to convert.

Returns
  The enum value associated with the string.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/Utils/StructToString.h